<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>SourceAnnotationExtractor::Annotation</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            SourceAnnotationExtractor::Annotation 
            
                <span class="parent">&lt; 
                    
                    Struct.new(:line, :tag, :text)
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/railties/lib/rails/source_annotation_extractor_rb.html">railties/lib/rails/source_annotation_extractor.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>D</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Annotation.html#method-c-directories">directories</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>T</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Annotation.html#method-i-to_s">to_s</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-directories">
            
              <b>directories</b>()
            
            <a href="Annotation.html#method-c-directories" name="method-c-directories" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-directories_source')" id="l_method-c-directories_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5a9b3b7a74e5b284312d69c8fd7a6fd3167f6dad/railties/lib/rails/source_annotation_extractor.rb#L17" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-directories_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/source_annotation_extractor.rb, line 17</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">directories</span>
  <span class="ruby-identifier">@@directories</span> <span class="ruby-operator">||=</span> <span class="ruby-node">%w(app config db lib test)</span> <span class="ruby-operator">+</span> (<span class="ruby-constant">ENV</span>[<span class="ruby-string">'SOURCE_ANNOTATION_DIRECTORIES'</span>] <span class="ruby-operator">||</span> <span class="ruby-string">''</span>).<span class="ruby-identifier">split</span>(<span class="ruby-string">','</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-to_s">
            
              <b>to_s</b>(options={})
            
            <a href="Annotation.html#method-i-to_s" name="method-i-to_s" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Returns a representation of the annotation that looks like this:</p>

<pre>[126] [TODO] This algorithm is simple and clearly correct, make it faster.</pre>

<p>If <code>options</code> has a flag <code>:tag</code> the tag is shown as in
the example above. Otherwise the string contains just line and text.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-to_s_source')" id="l_method-i-to_s_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/5a9b3b7a74e5b284312d69c8fd7a6fd3167f6dad/railties/lib/rails/source_annotation_extractor.rb#L27" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-to_s_source" class="dyn-source">
                <pre><span class="ruby-comment"># File railties/lib/rails/source_annotation_extractor.rb, line 27</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">to_s</span>(<span class="ruby-identifier">options</span>={})
  <span class="ruby-identifier">s</span> = <span class="ruby-node">&quot;[#{line.to_s.rjust(options[:indent])}] &quot;</span>
  <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;[#{tag}] &quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:tag</span>]
  <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">text</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    